package com.punai.common.constant;

import java.util.Date;

public class VerifyAccountConstants {
    /**
     * 账号类型
     */
    public enum ACCOUNT_TYPE{
        UNZS(0,"试用账号"),
        ZS(1,"正式账号");

        private Integer code;
        private String desc;

        ACCOUNT_TYPE(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    /**
     * 账号用途
     */
    public static String ACCOUNT_PLACE_CODE = "072";
    public enum ACCOUNT_PLACE {
        // 用途 0 工具  1 平台 2 通用
        GJ(0, "工具"),
        PT(1, "平台"),
        TY(2,"通用");
        private Integer code;
        private String desc;

        ACCOUNT_PLACE(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }


    public enum ACCOUNT_STATE{
        ENABLE(0,"正常"),
        DISABLE(1,"禁用");

        private Integer code;

        private String desc;

        ACCOUNT_STATE(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        // 时间判定方法
        public static Integer getState(Date useStart, Date useEnd) {
            Date currentDate = new Date();
            // 开始时间大于当前时间 or 结束时间小于当前时间
          /*  if (DateUtil.compareToDate(useStart,currentDate) > 0
                || DateUtil.compareToDate(useEnd,currentDate) < 0){
                return DISABLE.getCode();
            }*/
            return DISABLE.getCode();
        }
    }


}
